<template>
    <div class="clock" onclick="window.location.href='/'">
        {{ currentTime }} 
    </div>
    
</template>

<script setup>
    import { ref } from 'vue';
    const currentTime = ref(new Date().toLocaleDateString()+ "  " + new Date().toLocaleTimeString());
    
    setInterval(() => {
        currentTime.value  = new Date().toLocaleDateString(); 
        currentTime.value +=  "  "+new Date().toLocaleTimeString();
    }, 1000);
</script>

<style scoped>
.clock {
    font-size: 20px;
    text-align: center;
    color: rgb(237, 233, 241);

    border-radius: 10px;
    box-shadow: 0 0 5px rgba(183, 171, 184, 0.5);
}
</style>